/*!
* 
* Copyright (c) 2009 by yuqiang @ vcedu
* 
* Description:
*		This file contains the video output component
*
* ChangeLog:
*		$Date$	$Rev$	$Author$
* 
*/	

#ifndef _VIDEOOUTPUT_H_

#define _VIDEOOUTPUT_H_

#include <mipcomponent.h>
#include <miptypes.h>
#include <jthread.h>
#include <list>

#include "videowindow.h"

namespace librtp_video{

class VideoOuput : public MIPComponent
{
public:
	VideoOuput();
	~VideoOuput();

	/** Initializes the video output component. */
	bool init();

	/** De-initializes the component. */
	bool shutdown();
	
	bool push(const MIPComponentChain &chain, int64_t iteration, MIPMessage *pMsg);
	bool pull(const MIPComponentChain &chain, int64_t iteration, MIPMessage **pMsg);
private:
	
	JMutex m_lock;
	std::list<uint64_t> m_newIDs;
	std::list<VideoWindow *> m_videoWindows;
};

}

#endif // _VIDEOOUTPUT_H_

